﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
using Volo.Abp;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Bridge.Shared.Enums.Common;

namespace BaseInfo
{
    [Comment("供应商")]
    [Table("t_base_supplier")]
    public class Supplier : AuditedAggregateRoot<Guid>, ISoftDelete, IMultiTenant
    {
        public Supplier(Guid keyId)

        {
            this.Id = keyId;
        }

        public Supplier()
        {

        }
     
        [MaxLength(50)]
        [Comment("供应商编码-统一社会信用代码")]
        public string SupplierCode { get; set; }

        [MaxLength(200)]
        [Comment("供应商名称")]
        public string SupplierName { get; set; }

        [MaxLength(50)]
        [Comment("spd供应商编码")]
        public string SpdSupplierCode { get; set; }

        [MaxLength(400)]
        [Comment(" 供应商助记码")]
        public string MnemCode { get; set; }

        [Comment("供应商企业类型:0供应商; 1生厂商; 2代理商")]
        public EnterpriseType? EnterpriseType { get; set; }

        [MaxLength(50)]
        [Comment(" 法人")]
        public string LegalPerson { get; set; }

    
        [MaxLength(50)]
        [Comment(" 省")]
        public string Province { get; set; }

        [MaxLength(50)]
        [Comment("市")]
        public string City { get; set; }

        [MaxLength(50)]
        [Comment("区")]
        public string Area { get; set; }

        [MaxLength(200)]
        [Comment("地址")]
        public string Address { get; set; }

        [MaxLength(50)]
        [Comment("商品类型")]
        public string ProductType { get; set; }

        [MaxLength(50)]
        [Comment("供应商锁定状态")]
        public bool IsLock { get; set; }

        [Comment("是否启用")]
        public bool IsActive { get; set; }

        [MaxLength(200)]
        [Comment("备注")]
        public string Remark { get; set; }

        [Comment("成立日期")]
        public DateTime? BusinessDate { get; set; }

        [Comment("营业开始时间")]
        public DateTime? BusinessStart { get; set; }

        [Comment("营业截止时间")]
        public DateTime? BusinessEnd { get; set; }

        [Comment("是否长期经营")]
        public bool IslongTimeBusiness { get; set; }

        [MaxLength(200)]
        [Comment("联系人")]
        public string Contacts { get; set; }

        [MaxLength(200)]
        [Comment("联系电话")]
        public string ContactTel { get; set; }

        [Comment("配送天数")]
        public int DistributionDays { get; set; }
        public bool IsDeleted { get; set; } = false;

        public Guid? TenantId { get; set; }
    }
}
